// 知识库文章接口定义
export interface Article {
  id: number;
  title: string;
  content: string;
  category: string;
  tags: string[];
  author: string;
  status: '草稿' | '已发布' | '已归档';
  viewCount: number;
  likeCount: number;
  commentCount: number;
  collectCount: number;
  createdAt: string;
  updatedAt: string;
  publishedAt?: string;
  attachments: string[];
  summary?: string;
  relatedArticles?: number[];
}

// 知识库分类接口定义
export interface Category {
  id: number;
  name: string;
  description: string;
  articleCount: number;
  createdAt: string;
  updatedAt: string;
}

// 知识库API请求参数接口
export interface GetArticlesParams {
  page?: number;
  pageSize?: number;
  search?: string;
  category?: string;
  status?: string;
  author?: string;
  sortBy?: 'createdAt' | 'updatedAt' | 'viewCount' | 'likeCount';
  sortOrder?: 'asc' | 'desc';
}

// 知识库统计接口
export interface KnowledgeStats {
  totalArticles: number;
  publishedArticles: number;
  draftArticles: number;
  totalViews: number;
  totalLikes: number;
  totalComments: number;
  categoryCount: number;
}

// 文章分类分布接口
export interface ArticleCategoryDistribution {
  category: string;
  count: number;
  color: string;
}

// 文章状态分布接口
export interface ArticleStatusDistribution {
  status: string;
  count: number;
  color: string;
}